<!--
	作者：2575202388@qq.com
	时间：2018-10-14
	描述：文化课辅导班报名管理
-->

<template>
	<div style="width:100%;">
		<Dropdown ref="dropdown" :border="false">
			<Navigation slot="nav" >
				<Navigationitem @nav-click="sousuo(0)">所有</Navigationitem>
				<Navigationitem @nav-click="sousuo(1)">历史库</Navigationitem>
				<Navigationitem @nav-click="opensearch" iconshow>
					<Icon type="md-search" style="font-size: 14px;"/>
            		搜索
				</Navigationitem>
				
				<div style="right:50px;position:absolute;">
		    		<Button @click="openexport" icon="ios-download-outline" type="primary" style="background-color: #ffffff;border:1px solid #ccc;color:#333;margin-right: 5px;">导出</Button>
		    	</div>
			</Navigation>
			
			<div slot="content" style="height:70px;background: #fff;border-bottom:1px #dcdedd solid;">
				<ssxx v-on:getdata="getcxdata" ></ssxx>
			</div>
		</Dropdown>
		<div>
			<ss :tj="tj" ref="bmqkfdbss" @getSelection="getSelection"></ss>
		</div>
	</div>
</template>

<script>
	import ss from "./ss";
	import ssxx from "./ssxx";
	const _config = require('./../../../../../config/config')
	export default {
		name: "bmqkManage",
		data() {
			return {
				tj: {
					nj:'',//年级
					bj:'',//班级
					km:'',//科目
					shqk:'',//审核情况
					wstate:'0'//状态
				},
				selects:[],
				isopen: true,//搜索打开
			}
		},
		methods: {
			opensearch() {
				if(this.isopen) {
					this.$refs.dropdown.open();
				} else {
					this.$refs.dropdown.close();
				}
				this.isopen = !this.isopen;
			},
			
			search(){
				this.$refs.bmqkfdbss.load();
				this.opensearch() ;
			},
			sousuo(wstate){
				this.tj.wstate=wstate;
			},

	        getSelection(selects){
	      		this.selects=[...selects];
	      	},
	      	
	      	getcxdata(datas){
	      		this.tj.nj=datas.nj;
				this.tj.bj=datas.bj;
				this.tj.km=datas.km;
				this.tj.shqk=datas.shqk;
				this.search();
	      	},
	      	
	      	openexport(){
	      		window.open(_config._ADMIN_SERVER+"/stgl/bmqk/export_bmqkNow.html?nj="+this.tj.nj+"&bj="+this.tj.bj
	      		+"&km="+this.tj.km+"&shqk="+this.tj.shqk+"&wstate="+this.tj.wstate+"&bmlb=0")
	      	}
		},
		components: {
			ss,
			ssxx 
		},
		mounted(){
		},
		watch:{
		},
		computed: {
		}
	}
</script>

<style>
</style>